Buzzerstar.com/post.php -> Simple Post /schreiben.php -> Advanced Post Eingabe: Headline (max 7 wörter) Kategorie Textfeld Tags 1..5 Emailfeld: Absenden button -------- Logik: Wenn Simple Post genommen wird, zeige ein anderes Show.php - Template (Ohne Quellen, Ohne Links, Ohne Author) Parsing Logik für post.php: a. nimm den Text aus Textfeld b. explode(" ",$text) -> splitte alles an den leerzeichen auf. c. suche nach Video links: $str = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, https://www.youtube.com/watch?v=7TL02DA5MZM when an unknown printer took a galley of type and scrambled it to make a type"; preg_match('~(?:https?://)?(?:www.)?(?:youtube.com|youtu.be)/(?:watch\?v=)?([^\s]+)~', $str, $match); print_r($match); c.1. Später füge weitere Video Dienste hinzu. d. suche nach HTTP und HTTPS links d.1. für jeden Link gefunden, tue folgendes: d.1.1. checke mit CheckPicture.php ob es ein Bild ist, wenn ja speichere es in der bilddatenbank ===> wenn nur ein Bild gefunden wird, dann dies als Startbild einsetzen ===> wenn mehrere Bilder genommen werden, schreib sie als slider raus, jedoch nimm ein bild als Startseitenbild d.1.2. wenn es kein bild link is, adde ihn als rel nofollow im Text mit dem Textlink Anker "[Mehr Infos hier]" -> den link blau hervorheben und mit ins HTML schreiben an die entsprechende stelle e. hinterher alles wieder texttechnisch zusammen setzen f. nach allen 5 sätzen ein "
" schreiben -> Absätze Code Teile: // Linkify youtube URLs which are not already links. function linkifyYouTubeURLs($text) { $text = preg_replace('~ # Match non-linked youtube URL in the wild. (Rev:20130823) https?:// # Required scheme. Either http or https. (?:[0-9A-Z-]+\.)? # Optional subdomain. (?: # Group host alternatives. youtu\.be/ # Either youtu.be, | youtube # or youtube.com or (?:-nocookie)? # youtube-nocookie.com \.com # followed by \S* # Allow anything up to VIDEO_ID, [^\w\s-] # but char before ID is non-ID char. ) # End host alternatives. ([\w-]{11}) # $1: VIDEO_ID is exactly 11 chars. (?=[^\w-]|$) # Assert next char is non-ID or EOS. (?! # Assert URL is not pre-linked. [?=&+%\w.-]* # Allow URL (query) remainder. (?: # Group pre-linked alternatives. [\'"][^<>]*> # Either inside a start tag, | # or inside element text contents. ) # End recognized pre-linked alts. ) # End negative lookahead assertion. [?=&+%\w.-]* # Consume any URL (query) remainder. ~ix', 'YouTube link: $1', $text); return $text; } And Here is a JavaScript version with the exact same regex (with comments removed): // Linkify youtube URLs which are not already links. function linkifyYouTubeURLs(text) { var re = /https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube(?:-nocookie)?\.com\S*[^\w\s-])([\w-]{11})(?=[^\w-]|$)(?![?=&+%\w.-]*(?:['"][^<>]*>|<\/a>))[?=&+%\w.-]*/ig; return text.replace(re, 'YouTube link: $1'); } http://stackoverflow.com/questions/5830387/how-to-find-all-youtube-video-ids-in-a-string-using-a-regex?lq=1 Seo tools: http://www.wiseseo.de/preise/